<?php
class Application_Model_Carreras extends Zend_Db_Table_Abstract
{
    protected $_name ='carrera';
    protected $_primary ='id_carrera';
    
    public function getAll()
    {
        return $this->fetchAll();
    }
    public function save($bind, $id=null)
    {
        if(is_null($id)){
            $row=$this->createRow();
        }else{
            $row=$this->getRow($id);
        }
      
        $row->nombre_carrera=$bind['nombre_carrera'];
        return $row->save(); 
    }
    public function getRow($id){
        $id=(int)$id;
        $row=$this->find($id)->current();
        return $row;
    }
}